package com.zhonghui.common.eshopVo;

import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zhonghui.common.eshopSerializer.BigDecimalSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

@ApiModel(
        value = "YxStoreSeckillQueryVo对象",
        description = "商品秒杀产品表查询参数"
)
public class StoreSeckillQueryVo implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("商品秒杀产品表id")
    private Long id;
    @ApiModelProperty("商品id")
    private Long productId;
    @ApiModelProperty("推荐图")
    private String image;
    @ApiModelProperty("轮播图")
    private String images;
    private List<String> sliderImageArr;
    @JsonSerialize(
            using = BigDecimalSerializer.class
    )
    @ApiModelProperty("价格")
    private BigDecimal price;
    @JsonSerialize(
            using = BigDecimalSerializer.class
    )
    @ApiModelProperty("成本")
    private BigDecimal cost;
    @JsonSerialize(
            using = BigDecimalSerializer.class
    )
    @ApiModelProperty("原价")
    private BigDecimal otPrice;
    @ApiModelProperty("轮播图")
    private String[] pics;
    @ApiModelProperty("活动标题")
    private String title;
    @ApiModelProperty("简介")
    private String info;
    @ApiModelProperty("返多少积分")
    private BigDecimal giveIntegral;
    @ApiModelProperty("排序")
    private Integer sort;
    @ApiModelProperty("库存")
    private Integer stock;
    @ApiModelProperty("销量")
    private Integer sales;
    @ApiModelProperty("单位名")
    private String unitName;
    @ApiModelProperty("邮费")
    private BigDecimal postage;
    @ApiModelProperty("内容")
    private String description;
    @ApiModelProperty("开始时间")
    private Date startTime;
    @ApiModelProperty("结束时间")
    private Date stopTime;
    @ApiModelProperty("产品状态")
    private Integer status;
    @ApiModelProperty("最多秒杀几个")
    private Integer num;
    @ApiModelProperty("显示")
    private Integer isShow;
    @ApiModelProperty("百分比")
    private Integer percent;
    @JsonProperty("is_sub")
    private Integer isSub;

    public List<String> getSliderImageArr() {
        return (List)(StrUtil.isNotEmpty(this.images) ? Arrays.asList(this.images.split(",")) : new ArrayList());
    }

    public StoreSeckillQueryVo() {
    }

    public Long getId() {
        return this.id;
    }

    public Long getProductId() {
        return this.productId;
    }

    public String getImage() {
        return this.image;
    }

    public String getImages() {
        return this.images;
    }

    public BigDecimal getPrice() {
        return this.price;
    }

    public BigDecimal getCost() {
        return this.cost;
    }

    public BigDecimal getOtPrice() {
        return this.otPrice;
    }

    public String[] getPics() {
        return this.pics;
    }

    public String getTitle() {
        return this.title;
    }

    public String getInfo() {
        return this.info;
    }

    public BigDecimal getGiveIntegral() {
        return this.giveIntegral;
    }

    public Integer getSort() {
        return this.sort;
    }

    public Integer getStock() {
        return this.stock;
    }

    public Integer getSales() {
        return this.sales;
    }

    public String getUnitName() {
        return this.unitName;
    }

    public BigDecimal getPostage() {
        return this.postage;
    }

    public String getDescription() {
        return this.description;
    }

    public Date getStartTime() {
        return this.startTime;
    }

    public Date getStopTime() {
        return this.stopTime;
    }

    public Integer getStatus() {
        return this.status;
    }

    public Integer getNum() {
        return this.num;
    }

    public Integer getIsShow() {
        return this.isShow;
    }

    public Integer getPercent() {
        return this.percent;
    }

    public Integer getIsSub() {
        return this.isSub;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setProductId(final Long productId) {
        this.productId = productId;
    }

    public void setImage(final String image) {
        this.image = image;
    }

    public void setImages(final String images) {
        this.images = images;
    }

    public void setSliderImageArr(final List<String> sliderImageArr) {
        this.sliderImageArr = sliderImageArr;
    }

    public void setPrice(final BigDecimal price) {
        this.price = price;
    }

    public void setCost(final BigDecimal cost) {
        this.cost = cost;
    }

    public void setOtPrice(final BigDecimal otPrice) {
        this.otPrice = otPrice;
    }

    public void setPics(final String[] pics) {
        this.pics = pics;
    }

    public void setTitle(final String title) {
        this.title = title;
    }

    public void setInfo(final String info) {
        this.info = info;
    }

    public void setGiveIntegral(final BigDecimal giveIntegral) {
        this.giveIntegral = giveIntegral;
    }

    public void setSort(final Integer sort) {
        this.sort = sort;
    }

    public void setStock(final Integer stock) {
        this.stock = stock;
    }

    public void setSales(final Integer sales) {
        this.sales = sales;
    }

    public void setUnitName(final String unitName) {
        this.unitName = unitName;
    }

    public void setPostage(final BigDecimal postage) {
        this.postage = postage;
    }

    public void setDescription(final String description) {
        this.description = description;
    }

    public void setStartTime(final Date startTime) {
        this.startTime = startTime;
    }

    public void setStopTime(final Date stopTime) {
        this.stopTime = stopTime;
    }

    public void setStatus(final Integer status) {
        this.status = status;
    }

    public void setNum(final Integer num) {
        this.num = num;
    }

    public void setIsShow(final Integer isShow) {
        this.isShow = isShow;
    }

    public void setPercent(final Integer percent) {
        this.percent = percent;
    }

    @JsonProperty("is_sub")
    public void setIsSub(final Integer isSub) {
        this.isSub = isSub;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof StoreSeckillQueryVo)) {
            return false;
        } else {
            StoreSeckillQueryVo other = (StoreSeckillQueryVo)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label303: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label303;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label303;
                    }

                    return false;
                }

                Object this$productId = this.getProductId();
                Object other$productId = other.getProductId();
                if (this$productId == null) {
                    if (other$productId != null) {
                        return false;
                    }
                } else if (!this$productId.equals(other$productId)) {
                    return false;
                }

                Object this$sort = this.getSort();
                Object other$sort = other.getSort();
                if (this$sort == null) {
                    if (other$sort != null) {
                        return false;
                    }
                } else if (!this$sort.equals(other$sort)) {
                    return false;
                }

                label282: {
                    Object this$stock = this.getStock();
                    Object other$stock = other.getStock();
                    if (this$stock == null) {
                        if (other$stock == null) {
                            break label282;
                        }
                    } else if (this$stock.equals(other$stock)) {
                        break label282;
                    }

                    return false;
                }

                label275: {
                    Object this$sales = this.getSales();
                    Object other$sales = other.getSales();
                    if (this$sales == null) {
                        if (other$sales == null) {
                            break label275;
                        }
                    } else if (this$sales.equals(other$sales)) {
                        break label275;
                    }

                    return false;
                }

                Object this$status = this.getStatus();
                Object other$status = other.getStatus();
                if (this$status == null) {
                    if (other$status != null) {
                        return false;
                    }
                } else if (!this$status.equals(other$status)) {
                    return false;
                }

                Object this$num = this.getNum();
                Object other$num = other.getNum();
                if (this$num == null) {
                    if (other$num != null) {
                        return false;
                    }
                } else if (!this$num.equals(other$num)) {
                    return false;
                }

                label254: {
                    Object this$isShow = this.getIsShow();
                    Object other$isShow = other.getIsShow();
                    if (this$isShow == null) {
                        if (other$isShow == null) {
                            break label254;
                        }
                    } else if (this$isShow.equals(other$isShow)) {
                        break label254;
                    }

                    return false;
                }

                label247: {
                    Object this$percent = this.getPercent();
                    Object other$percent = other.getPercent();
                    if (this$percent == null) {
                        if (other$percent == null) {
                            break label247;
                        }
                    } else if (this$percent.equals(other$percent)) {
                        break label247;
                    }

                    return false;
                }

                Object this$isSub = this.getIsSub();
                Object other$isSub = other.getIsSub();
                if (this$isSub == null) {
                    if (other$isSub != null) {
                        return false;
                    }
                } else if (!this$isSub.equals(other$isSub)) {
                    return false;
                }

                label233: {
                    Object this$image = this.getImage();
                    Object other$image = other.getImage();
                    if (this$image == null) {
                        if (other$image == null) {
                            break label233;
                        }
                    } else if (this$image.equals(other$image)) {
                        break label233;
                    }

                    return false;
                }

                Object this$images = this.getImages();
                Object other$images = other.getImages();
                if (this$images == null) {
                    if (other$images != null) {
                        return false;
                    }
                } else if (!this$images.equals(other$images)) {
                    return false;
                }

                label219: {
                    Object this$sliderImageArr = this.getSliderImageArr();
                    Object other$sliderImageArr = other.getSliderImageArr();
                    if (this$sliderImageArr == null) {
                        if (other$sliderImageArr == null) {
                            break label219;
                        }
                    } else if (this$sliderImageArr.equals(other$sliderImageArr)) {
                        break label219;
                    }

                    return false;
                }

                Object this$price = this.getPrice();
                Object other$price = other.getPrice();
                if (this$price == null) {
                    if (other$price != null) {
                        return false;
                    }
                } else if (!this$price.equals(other$price)) {
                    return false;
                }

                Object this$cost = this.getCost();
                Object other$cost = other.getCost();
                if (this$cost == null) {
                    if (other$cost != null) {
                        return false;
                    }
                } else if (!this$cost.equals(other$cost)) {
                    return false;
                }

                label198: {
                    Object this$otPrice = this.getOtPrice();
                    Object other$otPrice = other.getOtPrice();
                    if (this$otPrice == null) {
                        if (other$otPrice == null) {
                            break label198;
                        }
                    } else if (this$otPrice.equals(other$otPrice)) {
                        break label198;
                    }

                    return false;
                }

                if (!Arrays.deepEquals(this.getPics(), other.getPics())) {
                    return false;
                } else {
                    label190: {
                        Object this$title = this.getTitle();
                        Object other$title = other.getTitle();
                        if (this$title == null) {
                            if (other$title == null) {
                                break label190;
                            }
                        } else if (this$title.equals(other$title)) {
                            break label190;
                        }

                        return false;
                    }

                    label183: {
                        Object this$info = this.getInfo();
                        Object other$info = other.getInfo();
                        if (this$info == null) {
                            if (other$info == null) {
                                break label183;
                            }
                        } else if (this$info.equals(other$info)) {
                            break label183;
                        }

                        return false;
                    }

                    Object this$giveIntegral = this.getGiveIntegral();
                    Object other$giveIntegral = other.getGiveIntegral();
                    if (this$giveIntegral == null) {
                        if (other$giveIntegral != null) {
                            return false;
                        }
                    } else if (!this$giveIntegral.equals(other$giveIntegral)) {
                        return false;
                    }

                    label169: {
                        Object this$unitName = this.getUnitName();
                        Object other$unitName = other.getUnitName();
                        if (this$unitName == null) {
                            if (other$unitName == null) {
                                break label169;
                            }
                        } else if (this$unitName.equals(other$unitName)) {
                            break label169;
                        }

                        return false;
                    }

                    Object this$postage = this.getPostage();
                    Object other$postage = other.getPostage();
                    if (this$postage == null) {
                        if (other$postage != null) {
                            return false;
                        }
                    } else if (!this$postage.equals(other$postage)) {
                        return false;
                    }

                    label155: {
                        Object this$description = this.getDescription();
                        Object other$description = other.getDescription();
                        if (this$description == null) {
                            if (other$description == null) {
                                break label155;
                            }
                        } else if (this$description.equals(other$description)) {
                            break label155;
                        }

                        return false;
                    }

                    Object this$startTime = this.getStartTime();
                    Object other$startTime = other.getStartTime();
                    if (this$startTime == null) {
                        if (other$startTime != null) {
                            return false;
                        }
                    } else if (!this$startTime.equals(other$startTime)) {
                        return false;
                    }

                    Object this$stopTime = this.getStopTime();
                    Object other$stopTime = other.getStopTime();
                    if (this$stopTime == null) {
                        if (other$stopTime != null) {
                            return false;
                        }
                    } else if (!this$stopTime.equals(other$stopTime)) {
                        return false;
                    }

                    return true;
                }
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof StoreSeckillQueryVo;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $productId = this.getProductId();
        result = result * 59 + ($productId == null ? 43 : $productId.hashCode());
        Object $sort = this.getSort();
        result = result * 59 + ($sort == null ? 43 : $sort.hashCode());
        Object $stock = this.getStock();
        result = result * 59 + ($stock == null ? 43 : $stock.hashCode());
        Object $sales = this.getSales();
        result = result * 59 + ($sales == null ? 43 : $sales.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $num = this.getNum();
        result = result * 59 + ($num == null ? 43 : $num.hashCode());
        Object $isShow = this.getIsShow();
        result = result * 59 + ($isShow == null ? 43 : $isShow.hashCode());
        Object $percent = this.getPercent();
        result = result * 59 + ($percent == null ? 43 : $percent.hashCode());
        Object $isSub = this.getIsSub();
        result = result * 59 + ($isSub == null ? 43 : $isSub.hashCode());
        Object $image = this.getImage();
        result = result * 59 + ($image == null ? 43 : $image.hashCode());
        Object $images = this.getImages();
        result = result * 59 + ($images == null ? 43 : $images.hashCode());
        Object $sliderImageArr = this.getSliderImageArr();
        result = result * 59 + ($sliderImageArr == null ? 43 : $sliderImageArr.hashCode());
        Object $price = this.getPrice();
        result = result * 59 + ($price == null ? 43 : $price.hashCode());
        Object $cost = this.getCost();
        result = result * 59 + ($cost == null ? 43 : $cost.hashCode());
        Object $otPrice = this.getOtPrice();
        result = result * 59 + ($otPrice == null ? 43 : $otPrice.hashCode());
        result = result * 59 + Arrays.deepHashCode(this.getPics());
        Object $title = this.getTitle();
        result = result * 59 + ($title == null ? 43 : $title.hashCode());
        Object $info = this.getInfo();
        result = result * 59 + ($info == null ? 43 : $info.hashCode());
        Object $giveIntegral = this.getGiveIntegral();
        result = result * 59 + ($giveIntegral == null ? 43 : $giveIntegral.hashCode());
        Object $unitName = this.getUnitName();
        result = result * 59 + ($unitName == null ? 43 : $unitName.hashCode());
        Object $postage = this.getPostage();
        result = result * 59 + ($postage == null ? 43 : $postage.hashCode());
        Object $description = this.getDescription();
        result = result * 59 + ($description == null ? 43 : $description.hashCode());
        Object $startTime = this.getStartTime();
        result = result * 59 + ($startTime == null ? 43 : $startTime.hashCode());
        Object $stopTime = this.getStopTime();
        result = result * 59 + ($stopTime == null ? 43 : $stopTime.hashCode());
        return result;
    }

    public String toString() {
        return "StoreSeckillQueryVo(id=" + this.getId() + ", productId=" + this.getProductId() + ", image=" + this.getImage() + ", images=" + this.getImages() + ", sliderImageArr=" + this.getSliderImageArr() + ", price=" + this.getPrice() + ", cost=" + this.getCost() + ", otPrice=" + this.getOtPrice() + ", pics=" + Arrays.deepToString(this.getPics()) + ", title=" + this.getTitle() + ", info=" + this.getInfo() + ", giveIntegral=" + this.getGiveIntegral() + ", sort=" + this.getSort() + ", stock=" + this.getStock() + ", sales=" + this.getSales() + ", unitName=" + this.getUnitName() + ", postage=" + this.getPostage() + ", description=" + this.getDescription() + ", startTime=" + this.getStartTime() + ", stopTime=" + this.getStopTime() + ", status=" + this.getStatus() + ", num=" + this.getNum() + ", isShow=" + this.getIsShow() + ", percent=" + this.getPercent() + ", isSub=" + this.getIsSub() + ")";
    }
}
